﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Edu.Web.Data.DV;
using Edu.Web.Data.Entity;

namespace Edu.Web.Data.DAO.Impl
{
    public partial class TeacherDAO
    {
        public IQueryable<TeacherDV> GetTeacherList()
        {
            return from u in Db.Set<UserEntity>()
                   join t in Db.Set<TeacherEntity>() on u.Id equals t.UserId
                   select new TeacherDV
                   {
                       TeaNO = t.TeaNo,
                       CreateTime = u.CreateTime,
                       Gender = u.Gender,
                       RealName = u.RealName,
                       Id = u.Id,
                       UserName = u.UserName
                   };
        }
    }
}